package com.hedl.classroom.controller;

import com.hedl.classroom.model.dto.CourseCategoryTreeDto;
import com.hedl.classroom.service.CourseCategoryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 课程分类相关接口
 */
@Slf4j
@RestController
@Api(value = "课程分类相关接口",tags = {"课程分类相关接口"})
public class CourseCategoryController {

    @Resource
    @ApiModelProperty(value = "课程分类相关接口",dataType = "Object")
    private CourseCategoryService courseCategoryService;

    @GetMapping("/course-category/tree-nodes")
    @ApiOperation(value = "课程分类查询")
    public List<CourseCategoryTreeDto> queryTreeNodes(){
        return courseCategoryService.queryTreeNodes("1");
    }
}
